package com.info.zhiduoduo.admin.controller;


import com.info.zhiduoduo.admin.model.formbean.statistics.StatisticsLastThreeMonthsFormBean;
import com.info.zhiduoduo.admin.service.StatisticsService;
import com.info.zhiduoduo.common.constants.SmartResult;
import com.info.zhiduoduo.common.formbean.BaseSimpleFormBean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author Trink丶
 */
@Api(tags = "统计信息接口")
@RestController("/statisticsInformation")
public class StatisticController {

    @Autowired
    StatisticsService statisticsService;

    @ApiOperation(" 企业最近三个月的交易信息")
    @PostMapping("/infoOfCompanyLastThreeMonths")
    public SmartResult compInfoOfCompanyLastThreeMonths(@RequestBody BaseSimpleFormBean<StatisticsLastThreeMonthsFormBean> formBean) {
        return statisticsService.compInfoOfCompanyLastThreeMonths(formBean);
    }

    @ApiOperation("智众包企业最近三个月的交易信息")
    @PostMapping("/infoOfCrowdsourceLastThreeMonths")
    public SmartResult compInfoOfCrowdsourceLastThreeMonths(@RequestBody BaseSimpleFormBean<StatisticsLastThreeMonthsFormBean> formBean) {
        return statisticsService.compInfoOfCrowdsourceLastThreeMonths(formBean);
    }


    @ApiOperation(" 最近三个月的交易信息")
    @PostMapping("/infoOfTaxerLastThreeMonths")
    public SmartResult infoOfTaxerLastThreeMonths(@RequestBody BaseSimpleFormBean<StatisticsLastThreeMonthsFormBean> formBean) {
        return statisticsService.infoOfTaxerLastThreeMonths(formBean);
    }
}
